﻿using System.Collections.ObjectModel;
using Prism.Mvvm;

namespace Models;

public class MenuItemModel : BindableBase
{
    private bool isExpanded;
    private int menuType;

    /// <summary>
    ///     子节点
    /// </summary>
    public ObservableCollection<MenuItemModel> Children { get; set; } = new();

    // 是否展开节点
    public bool IsExpanded
    {
        get => isExpanded;
        set => SetProperty(ref isExpanded, value);
    }

    public string? MenuHeader { get; set; }
    public string? MenuIcon { get; set; }
    public string? TargetView { get; set; } // 双击这个节点的时候打开的页面

    /// <summary>
    ///  父节点Id
    /// </summary>
    public int ParentId { get; set; }

    public bool IsLastChild { get; set; }

    public int MenuType
    {
        get => menuType;
        set => SetProperty(ref menuType, value);
    }

    public int Id { get; set; }
}
